import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
     //    {
     // 	path: '/',
     // 	name: 'home',
     // 	component: Home
     // },
     /***组件 数据**/
     {
          path: "/",
          name: "keep-alive",
          title: "iframes页面",
          component: () => import("../views/component/keep-alive.vue")
     },
     {
          path: "/extend-mount",
          name: "extend-mount",
          title: "extend-mount",
          component: () => import("../views/component/extend-mount.vue")
     },
     {
          path: "/componets",
          name: "componets",
          title: "内置componets",
          component: () => import("../views/component/componets.vue")
     },
     {
          path: "/index",
          name: "component",
          title: "组件",
          component: () => import("../views/component/index.vue")
     },
     {
          path: '/f1',
          name: 'f1',
          title: "百度",
          url: "http://www.baidu.com",
          iframeComponent: "true"
     },
     {
          path: '/f2',
          name: 'f2',
          title: "layui 官网",
          url: "https://www.layui.com/admin/std/dist/views/",
          iframeComponent: "true"
     },
     // // ***mock 数据**/
     {
          path: "/mock",
          name: "mock",
          title: "mock 数据",
          component: () => import("../views/mockTest/index.vue")
     },
     // // ***插件 pulgin 封装*/
     {
          path: "/pulgin",
          name: "pulgin",
          title: "pulgin 封装",
          component: () => import("../views/pulgin/index.vue")
     },
     // ***mixin 封装*/
     {
          path: "/mixin",
          name: "mixin",
          title: "mixin 封装",
          component: () => import("../views/mixin/index.vue")
     },
     // ***数据访问相关*/
     {
          path: "/devServer",
          name: "devServer",
          title: "devServer数据访问",
          component: () => import("../views/devServer/index.vue")
     },
     // ***渲染函数 css模块引用*/
     {
          path: "/createElement",
          name: "createElement",
          title: "createElement 渲染",
          component: () => import("../views/createElement/index.vue")
     },
     // *** 组件*/
     {
          path: "/assembly",
          name: "assembly",
          title: "组件",
          component: () => import("../views/assembly/index.vue")
     },
     // *** filter 的案例 开始/
     {
          path: "/filter",
          name: "filter",
          title: "filter 过滤",
          component: () => import("../views/filter/index.vue")
     },
     // *** 本地数据获取*/
     {
          path: "/localData",
          name: "localData",
          title: "localData 本地数据",
          component: () => import("../views/localData/index.vue")
     },
     // *** vuex 的案例 开始/
     {
          path: "/count",
          name: "count",
          title: "vuex",
          component: () => import("../views/vuex-dome/count.vue")
     },
     {
          path: "/login",
          name: "login",
          title: "登录",
          component: () => import("../views/vuex-dome/login.vue")
     },
     // {
     //      path: "/",
     //      name: "index",
     //      component: () => import("../views/vuex-dome/index.vue")
     // },
     {
          path: "/userCenter",
          name: "userCenter",
          title: "用户中心",
          component: () => import("../views/vuex-dome/userCenter.vue")
     },
     {
          path: "/course/:id",
          name: "course",
          title: "vuex 案例",
          component: () => import("../views/vuex-dome/course.vue")
     }
     // *** vuex 的案例 结束/

]

const router = new VueRouter({
     routes
})

export default router